import React, { Component } from "react";

// const styleObj = { color: "red" };
class App extends Component {
  render() {
    return (
      <>
        <h2>style添加内联样式</h2>
        {/* style的属性值必须是对象 */}
        {/* 如果出现连字符，写成小驼峰 */}
        {/* 属性值都是要加引号，除了px可以直接写数字 */}
        <p style={{ color: "red", fontSize: 30, lineHeight: 1 }}>
          hello react!!
        </p>
      </>
    );
  }
}

export default App;
